<%-- 
    Document   : edit
    Created on : Jun 19, 2012, 11:33:01 PM
    Author     : karuna
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.sql.*,java.io.*" %>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");

         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","pac","mca"); 

         Statement stmt=con.createStatement();
         String student_name="" ;
    
           String student_id="" ;
            String college_code="" ;
            String course=""; 
           String ssc="" ;
           String ssc_year="";
           String  inter="";         
         String  inter_year="" ;     
          String  graduation="" ;
          String  graduation_year="";
          String  pg="" ;         
           String pg_year=""; 
          String technical_skills="";
           String mobile="";
           String email="";                          
        
String str=request.getParameter("student_id");
out.println(str);

         ResultSet rs = stmt.executeQuery("SELECT * FROM student_register WHERE student_id='"+str+"'");
         if(rs.next())

         {
                      
             student_name = rs.getString("student_name");
           out.println(student_name);
            student_id = rs.getString(2);
           college_code = rs.getString(3);         
           course = rs.getString("course");
         String  student_uname=rs.getString(5);            

      }
            
          ResultSet rs3=stmt.executeQuery("SELECT *FROM student_marks WHERE student_id='"+str+"'");

        if(rs3.next())
        {
           ssc = rs3.getString("ssc");
           ssc_year = rs3.getString("ssc_year");
            inter = rs3.getString("inter");         
          inter_year = rs3.getString("inter_year");     
           graduation = rs3.getString("graduation");
           graduation_year = rs3.getString("graduation_year");
           pg = rs3.getString("pg");         
           pg_year = rs3.getString("pg_year"); 
          technical_skills=rs3.getString("technical_skills");
                             
        }
           ResultSet rs4=stmt.executeQuery("SELECT *FROM student_details WHERE student_id='"+str+"'");
        if(rs4.next())
        {
           mobile = rs4.getString("student_mobile");
           email = rs4.getString("student_email");
         }
		 
	
   %>
       

<html>


<head>  
      
       <br><br>
      <center>  <h1> Edit Form  </h1> <center>

     <STYLE Type="text/css">
			TD {Text-Align:Left; Font-Size:16pt}
			.chk:focus{
			   background-color:brown;
			  }

                  
      </style>
</head>

<body background="t5.jpg">

<h3>


<form action="update.jsp" method="POST">

<br><br>

<table width="700" cellpadding="5">


   <tr>
       <td> Student ID : </td>
            <td> <% 
            out.println(str); %><td>
   </tr>


   <tr>
       <td> Student Name : </td>
       <td> <input class=chk type="text"  size="30" style="font-size:14pt; height:30px" name="student_name" value="<%= student_name %>" /></td>
   </tr>

   
 
    <tr>
        <td> Course : </td>
        <td>  <input class=chk type="text"  size="30" style="font-size:14pt; height:30px" name="course" value="<%= course %>" /></td>
   </tr>

  <tr>
      <td> SSC Marks Percentage :</td>
      <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="ssc" value="<%=ssc%>" /></td>
   </tr>

   <tr>
       <td> Year of passing  :</td>
       <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="ssc_year"  value="<%=ssc_year%>" /></td>
   </tr>

 <tr>
     <td> Intermediate Marks Percentage :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="inter"  value="<%=inter%>" /></td>
   </tr>

<tr>
          <td> Year of passing  :</td>
          <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="inter_year" value="<%=inter_year%>"/></td>
   </tr>


 <tr>
     <td> Graduation Marks Percentage :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="graduation" value="<%=graduation%>"/></td>
   </tr>

 <tr>
     <td> Year of passing  :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="graduation_year" value="<%=graduation_year%>" /></td>
  </tr>

 <tr>
     <td> PG Marks Percentage :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="pg" value="<%=pg%>" /></td>
   </tr>


 <tr>
     <td> Year of passing  :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="pg_year" value=" <%=pg_year%>" /></td>
   </tr>
   
  <tr>
     <td> technical_skills :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="technical_skills" value=" <%=technical_skills%>" /></td>
   </tr>

 <tr>
     <td> student_mobile  :</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="mobile" value="<%=mobile%>" /></td>
   </tr>

 <tr>
     <td>  student_email:</td>
     <td> <input class=chk type="text" size="30" style="font-size:14pt; height:30px" name="email" value="<%=email%>" /></td>
   </tr>

<table>

<br><br>
    <input class=chk type="hidden" size="30" style="font-size:14pt; height:30px" name="student_id" value="<%=str%>" />

<center>  <input type="submit" style="height: 25px; width: 100px; background-color:darkgrey"  value="ok"/> </center>


</form>

</h3></body></html>
